#include "tire.h"

void Tire::setModel(string _model)
{
    model=_model;
}

void Tire::setSize(int _size)
{
    size=_size;
}


void Tire::print ()
{
    cout<<"轮胎:"<<endl;
    cout<<" i.型号："<< model<<endl<< "ii:尺寸："<< size<<"mm"<<endl;
}


void Tire::save (string path)
{
    ofstream ofs;// 创建流对象
    ofs.open(path, ios::out | ios::app);

    ofs <<"轮胎:"<<endl<<" i.型号："<< model<<endl<< "ii:尺寸："<< size<<"mm"<<endl;

    ofs.close();
}
